<?PHP
include("config/connect.php");
include("public/common.php");

$tb_id = CheckUrlParamNoDie("tb_id");
$id = CheckUrlParamNoDie("id");
$code = "";
if( $tb_id != "" )
{
	$sql = "select id,type from user where tb_id='$tb_id' limit 1";
	$result = mysql_query( $sql );
	$row = mysql_fetch_assoc( $result );
	
	$id = $row["id"];
	$code = MakeRecommendCodeFrom($id, $row["type"]);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>购物兔——立即推荐给您的好友，一起加入网购省钱大行动吧！</title>
<script language="javascript">
function OnLoadBody()
{
	var obj = document.getElementById( "frend_id" );
	obj.value = "http://gouwutu.com/rmd/<?PHP echo $code; ?>.html";
	obj.select();
}

function copyToClipboard(txt) 
{    
    if(window.clipboardData) {    
        window.clipboardData.clearData();
        var str;
        str = "推荐一个淘宝购物专用省钱浏览器，可以去金山软件管家下载，也可以在下面官网地址下载。\r\n"
        str += "需要邀请码的，可以用我这个：<?PHP echo $code; ?>，使用中遇到问题可加官方QQ用户群：25276471\r\n";
        str += txt;
        window.clipboardData.setData("Text", str);
    }  
    alert("复制成功，你可以把它粘帖在QQ或MSN的聊天窗口中，发送给您的好友。");   
}

function OnCopyClip()
{
	var obj = document.getElementById( "frend_id" );
	copyToClipboard( obj.value );
}
function OnSelectAll()
{
	var obj = document.getElementById( "frend_id" );
	obj.select();
}
</script>
<style type="text/css">
<!--
body,td,th {
	font-size: 14px;
	color: #000;
	font-family: 宋体;
}
body {
	background-color: #FFF;
}
.STYLE1 {
	font-size: 12px;
	color: #666666;
}
-->
</style>
</head>

<body scroll="no" onload="OnLoadBody()" style="overflow-x:hidden;overflow-y:hidden;background:url(images/recommend_bg.jpg); background-repeat:repeat-x;">
<table align="center">
<tr><td align="center"><img src="images/recommend_title.jpg" width="179" height="37" /></td></tr>
<tr><td>&nbsp;</td></tr>
<tr>
  <td style="line-height:1.5;">立即把“购物兔”推荐给您的好友，让Ta一起加入省钱大行动，分享属于您们的快乐吧！<br />
  您可以把下面的分享链接复制，粘帖到QQ或MSN的聊天窗口中，分享给您的好友~
    </td>
</tr>
<tr><td height="10"></td></tr>
<tr><td><input type="text" style="width:386px; height:25px; font-size:12px; line-height:22px; border:#09C 1px solid; font-size:16px" id="frend_id" onclick="javascript:OnSelectAll()"/>
  <img src="images/copy_url.gif" onclick="javascript:OnCopyClip()" align="absmiddle"/></td>
</tr>
<tr>
  <td><span style="line-height:1.5;">您的邀请码：</span><span style="color:#FF0033; font-weight:bold"><?PHP echo $code; ?></span></td>
</tr>
<tr><td height="10"></td></tr>
 <tr><td height="28px"><strong>您也可以分享到：</strong></td></tr>
<tr><td><!-- JiaThis Button BEGIN -->
<div id="jiathis_style_32x32">
	<a class="jiathis_button_tsina"></a>
    <a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_kaixin001"></a>
	<a class="jiathis_button_renren"></a>
    <a class="jiathis_button_icons_1"></a>
	<a class="jiathis_button_icons_2"></a>
	<a class="jiathis_button_icons_3"></a>
	<a class="jiathis_button_icons_4"></a>
   	<a class="jiathis_button_icons_5"></a>
    <a class="jiathis_button_icons_6"></a>
    <a class="jiathis_button_icons_7"></a>
    <a class="jiathis_button_icons_8"></a>
    <a class="jiathis_button_icons_9"></a>
</div>
<!-- JiaThis Button END --></td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td><hr></td></tr>
<tr><td align="center"><span class="STYLE1">有任何疑问，或者建议，都可以随时联系我们哦~兔子的发展和完善，离不开大家的热心支持！</span>
</td>
</tr>
<tr>
  <td align="center">QQ客服：<a href="http://wpa.qq.com/msgrd?v=3&amp;uin=1753949757&amp;site=qq&amp;menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=2:1753949757:42" alt="点击和我们交流" border="0" align="absmiddle" title="欢迎点击和我们交流" /></a>
  &nbsp;&nbsp;邮箱：<a href="mailto:admin@gouwutu.com">admin@gouwutu.com</a></td>
</tr>
</table>

</body>
</html>

<!-- JiaThis Button BEGIN -->
<script type="text/javascript">
	var jiathis_config = {
		"data_track_clickback":true,
		url: "http://www.gouwutu.com/rmd/<?PHP echo $code; ?>.html",
		title: "用 购物兔 浏览器上淘宝，立即省3~30%，完美支持促销、打折和团购等活动，用过的都说爽~"
		};
</script>
<script type="text/javascript" src="http://v1.jiathis.com/code/jia.js?uid=904300" charset="utf-8"></script>
<!-- JiaThis Button END -->

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-20984072-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F7eb75a7b189f4a709dead85bc20eb0dd' type='text/javascript'%3E%3C/script%3E"));
</script>